/* 通用接口管理 & 导出各版块接口 */
import http from "./http";
import banner from "./banner";

// 用户登录
const login = (userName, passwordMd5) => {
    return http.post('/adminUser/login', {
        userName,
        passwordMd5
    });
};

// 获取登陆者信息
const profile = () => http.get('/adminUser/profile');

// 上传图片
const upload = file => {
    let fm = new FormData();
    fm.append('file', file);
    return http.post('/upload/file', fm);
};

export default {
    login,
    profile,
    upload,
    banner
};